<?xml version="1.0" encoding="UTF-8"?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1">
<jsp:directive.page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" />
<jsp:directive.page import="java.util.ArrayList, java.util.Iterator, cult.ticketing.bean.*" />
<jsp:output omit-xml-declaration="no" doctype-root-element="html" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" />
<jsp:include page="templates/include_header.html" />

<jsp:text><![CDATA[<html>
<head>
<title>Cult Ticketing System</title>
<!--<script type="text/javascript">
    function buyTicket() {
      document.getElementById("movieList").todo.value = "purchase";
      document.getElementById("frmGuest").submit();

    }
</script>-->

<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/style.css" rel="stylesheet" type="text/css" />
<link href="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/css/movie.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">
]]></jsp:text>
<jsp:include page="templates/include_menu.jsp" />
<jsp:text><![CDATA[<div id="main">
        <div id="content">
        <div id="head_image">
        	<div id="slogan"><strong>Cult Ticketing System -- Pay</strong><br />
       	    </div>
            <div id="under_slogan_text">
                <br /><br /><br /><br />

            </div>
          </div>

         <div id="left">]]></jsp:text>
            <jsp:include page="templates/login.jsp" />
            <jsp:include page="templates/calendar.html" />
         <jsp:text><![CDATA[</div>

         <div id="right">
            <h1>Pay</h1>
            <p>&nbsp;</p>]]></jsp:text>

            <jsp:scriptlet>
                final String CREDIT_CARD = "creditCard";
                final String LOYALTY_POINT = "loyaltyPoint";
                if (request.getParameter("purchaseMethod").equals(CREDIT_CARD)){</jsp:scriptlet>
                    <jsp:text><![CDATA[
                        



                        <p>Credit Card System is not implemented. Click "Confirm" button and assume the payment is successful.</p>]]></jsp:text>
                <jsp:scriptlet>}
                else {</jsp:scriptlet>
                    <jsp:text><![CDATA[<p>Your loyalty point is XX. This purchase will cost you XX. Click "Confirm" to pay by loyalty point.</p>]]></jsp:text>
                <jsp:scriptlet>}
            </jsp:scriptlet>

            <jsp:text><![CDATA[
            <form name="payment" id="payment" method="post" action="]]></jsp:text><jsp:expression>request.getContextPath()</jsp:expression><jsp:text><![CDATA[/jsp/payment_result.jsp">
            <input type="hidden" name="todo" id="todo" value="purchase" />
            Please input your email address:
            <input type="text" name="email" id="email" value="" />

            <input type="submit" value="Confirm" />
            </form>]]></jsp:text>

        <jsp:text><![CDATA[
        </div>
	</div>
</div>
</div>]]></jsp:text>
<jsp:include page="templates/include_footer.html" />
<jsp:text><![CDATA[</body>
</html>
]]></jsp:text>
</jsp:root>
